package com.jspx.txweb.table;

import com.jspx.sober.annotation.Column;
import com.jspx.sober.annotation.IDType;
import com.jspx.sober.annotation.Id;
import com.jspx.sober.annotation.Table;
import com.jspx.sober.table.OperateTable;
import com.jspx.utils.StringUtil;
import java.util.Date;

/**
 * Created by chenyuan on 14-6-27.
 *  com.jspx.txweb.table.PhotoPattern
 */
@Table(name = "jspx_photo_pattern", caption = "图片样板",cache = true)
public class PhotoPattern extends OperateTable {

    @Id(auto = false,type= IDType.serial)
    @Column(caption="ID",notNull = true)
    private long id = 0;

    @Column(caption = "标题", dataType="isLengthBetween(2,100)",length = 100,notNull = true)
    private String name = StringUtil.empty;

    @Column(caption = "拼音", dataType="isLengthBetween(2,100)",length = 100)
    private String spelling = StringUtil.empty;

    @Column(caption = "图片数量",notNull = true)
    private int photoNumber = 1;

    @Column(caption = "缩图", length = 200, dataType = "isLengthBetween(1,200)", notNull = true)
    private String button = StringUtil.empty;

    @Column(caption = "内容", length = 8000, dataType = "isLengthBetween(1,99999)", notNull = true)
    private String content = StringUtil.empty;

    /**
     * img*=300x300
     * img1=300x300
     * img1=500x500
     *
     */
    @Column(caption = "切图", length = 250, dataType = "isLengthBetween(0,250)", notNull = true)
    private String cutScript = StringUtil.empty;

    @Column(caption = "是否审核", length = 2, notNull = true, defaultValue = "0")
    private int auditingType = 0;

    @Column(caption = "审核时间", notNull = true)
    private Date auditingDate = new Date();

    @Column(caption = "排序", option = "0:默认;2:固顶;4:置顶;8:结对置顶;-1:下沉", notNull = true, defaultValue = "0")
    private int sortType = 0;

    @Column(caption = "排序时间", notNull = true)
    private Date sortDate = new Date();

    @Column(caption = "域名", length = 50, notNull = true)
    private String namespace = StringUtil.empty;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpelling() {
        return spelling;
    }

    public void setSpelling(String spelling) {
        this.spelling = spelling;
    }

    public int getPhotoNumber() {
        return photoNumber;
    }

    public void setPhotoNumber(int photoNumber) {
        this.photoNumber = photoNumber;
    }

    public String getButton() {
        return button;
    }

    public void setButton(String button) {
        this.button = button;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCutScript() {
        return cutScript;
    }

    public void setCutScript(String cutScript) {
        this.cutScript = cutScript;
    }

    public int getAuditingType() {
        return auditingType;
    }

    public void setAuditingType(int auditingType) {
        this.auditingType = auditingType;
    }

    public Date getAuditingDate() {
        return auditingDate;
    }

    public void setAuditingDate(Date auditingDate) {
        this.auditingDate = auditingDate;
    }

    public int getSortType() {
        return sortType;
    }

    public void setSortType(int sortType) {
        this.sortType = sortType;
    }

    public Date getSortDate() {
        return sortDate;
    }

    public void setSortDate(Date sortDate) {
        this.sortDate = sortDate;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }
}
